glglyphcache: Pass lookup key to g_hash_table_lookup directly
authorTimm Bäder <mail@baedert.org>
Fri, 2 Mar 2018 16:22:46 +0000 (17:22 +0100)
committerTimm Bäder <mail@baedert.org>
Sun, 4 Mar 2018 18:12:04 +0000 (19:12 +0100)
gsk/gl/gskglglyphcache.c

index 5012eb82a2183989f91d399b87ce12d906f58df9..e1d9ffd50bf2d36e338c8305ebade4a604cfc2cf 100644 (file)
@@ -315,14 +315,14 @@ gsk_gl_glyph_cache_lookup (GskGLGlyphCache *cache,
                            PangoGlyph       glyph,
                            float            scale)
 {
-  GlyphCacheKey lookup_key;
   GskGLCachedGlyph *value;
 
-  lookup_key.font = font;
-  lookup_key.glyph = glyph;
-  lookup_key.scale = (guint)(scale * 1024);
-
-  value = g_hash_table_lookup (cache->hash_table, &lookup_key);
+  value = g_hash_table_lookup (cache->hash_table,
+                               &(GlyphCacheKey) {
+                                 .font = font,
+                                 .glyph = glyph,
+                                 .scale = (guint)(scale * 1024)
+                               });
 
   if (value)
     {